Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support big page PUT into blobstore. #4882

Merged
merged 6 commits into from
May 13, 2022
Merged

Support big page PUT into blobstore. #4882

merged 6 commits into from
May 13, 2022

Conversation

jiaqizho
Copy link
Contributor

@jiaqizho jiaqizho commented May 12, 2022

What problem does this PR solve?

Issue Number: ref #3594

Problem Summary:

  • BlobStore can't support a single page whose page size is bigger than config.file_limit_size.
  • Also can't support WriteBatch whose size is bigger than config.file_limit_size.

What is changed and how it works?

  • Added a new SpaceMap type which named SMAP64_BIG
    • It pairs with page which sizes bigger than config.file_limit_size
    • This type of SpaceMap can't be insert twice and also can't be reused.
  • Added a new BlobStatType named BIG_BLOB
    • This type of stat only can use SMAP64_BIG type to store the address.
    • And this type of stat won't be GC but it can be deleted if that page has been removed.
    • this type of stat won't be reused.
  • Also split big size of WriteBatch in write().

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented May 12, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JaySon-Huang
  • hehechen

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label May 12, 2022
@jiaqizho jiaqizho requested a review from lidezhu May 12, 2022 11:33
@ti-chi-bot ti-chi-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 12, 2022
@jiaqizho jiaqizho requested a review from flowbehappy May 12, 2022 11:33
@jiaqizho
Copy link
Contributor Author

/run-all-tests

@jiaqizho jiaqizho requested a review from hehechen May 12, 2022 11:56
@sre-bot
Copy link
Collaborator

sre-bot commented May 12, 2022

Coverage for changed files

Filename                       Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BlobStore.cpp                      546               153    71.98%          52                 1    98.08%        1119               235    79.00%         346               123    64.45%
BlobStore.h                         11                 2    81.82%          11                 2    81.82%          47                23    51.06%           0                 0         -
spacemap/SpaceMap.cpp               37                 4    89.19%           7                 0   100.00%          58                13    77.59%          26                 7    73.08%
spacemap/SpaceMap.h                  8                 3    62.50%           4                 1    75.00%          20                 7    65.00%           8                 2    75.00%
spacemap/SpaceMapBig.h              31                11    64.52%          11                 4    63.64%          70                43    38.57%          14                 7    50.00%
spacemap/SpaceMapSTDMap.h          158                20    87.34%          11                 0   100.00%         259                23    91.12%         100                21    79.00%
tests/gtest_blob_store.cpp        5488              1185    78.41%          27                 1    96.30%        1169                66    94.35%        1698               849    50.00%
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                             6279              1378    78.05%         123                 9    92.68%        2742               410    85.05%        2192              1009    53.97%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18172      9817             45.98%    203006  98381        51.54%

full coverage report (for internal network access only)

@jiaqizho
Copy link
Contributor Author

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented May 12, 2022

Coverage for changed files

Filename                       Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BlobStore.cpp                      546               153    71.98%          52                 1    98.08%        1119               235    79.00%         346               123    64.45%
BlobStore.h                         11                 2    81.82%          11                 2    81.82%          47                23    51.06%           0                 0         -
spacemap/SpaceMap.cpp               37                 4    89.19%           7                 0   100.00%          58                13    77.59%          26                 7    73.08%
spacemap/SpaceMap.h                  8                 3    62.50%           4                 1    75.00%          20                 7    65.00%           8                 2    75.00%
spacemap/SpaceMapBig.h              31                11    64.52%          11                 4    63.64%          70                43    38.57%          14                 7    50.00%
spacemap/SpaceMapSTDMap.h          158                20    87.34%          11                 0   100.00%         259                23    91.12%         100                21    79.00%
tests/gtest_blob_store.cpp        5488              1185    78.41%          27                 1    96.30%        1169                66    94.35%        1698               849    50.00%
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                             6279              1378    78.05%         123                 9    92.68%        2742               410    85.05%        2192              1009    53.97%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18172      9817             45.98%    203006  98369        51.54%

full coverage report (for internal network access only)

dbms/src/Storages/Page/V3/BlobStore.cpp Outdated Show resolved Hide resolved
dbms/src/Storages/Page/V3/spacemap/SpaceMap.h Outdated Show resolved Hide resolved
dbms/src/Storages/Page/V3/BlobStore.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@hehechen hehechen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add description about What is changed and how it works? and update the design doc.

@jiaqizho
Copy link
Contributor Author

Add description about What is changed and how it works? and update the design doc.

done

hehechen
hehechen approved these changes May 13, 2022
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 13, 2022
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 13, 2022
@JaySon-Huang
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 976f144

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 13, 2022
@ti-chi-bot
Copy link
Member

@jiaqizho: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@sre-bot
Copy link
Collaborator

sre-bot commented May 13, 2022

Coverage for changed files

Filename                       Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BlobStore.cpp                      547               153    72.03%          53                 1    98.11%        1123               235    79.07%         346               123    64.45%
BlobStore.h                         10                 2    80.00%          10                 2    80.00%          46                23    50.00%           0                 0         -
spacemap/SpaceMap.cpp               37                 4    89.19%           7                 0   100.00%          58                13    77.59%          26                 7    73.08%
spacemap/SpaceMap.h                  8                 3    62.50%           4                 1    75.00%          20                 7    65.00%           8                 2    75.00%
spacemap/SpaceMapBig.h              31                11    64.52%          11                 4    63.64%          70                43    38.57%          14                 7    50.00%
spacemap/SpaceMapSTDMap.h          158                20    87.34%          11                 0   100.00%         259                23    91.12%         100                21    79.00%
tests/gtest_blob_store.cpp        5488              1185    78.41%          27                 1    96.30%        1169                66    94.35%        1698               849    50.00%
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                             6279              1378    78.05%         123                 9    92.68%        2745               410    85.06%        2192              1009    53.97%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18148      9789             46.06%    202725  98008        51.65%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit 65bdafa into pingcap:master May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants